package thread02;
/*
* 自定义线程
* */
public class Thread01 extends Thread {
    public void run(){
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        // 线程要执行的任务
        for (int i = 0; i < 10; i++) {
            System.out.println(getName()+i);
        }
    }
}
